<template>
	<view class="add-content">
		<uni-header :title="title"></uni-header>
		<addClass v-if="type == 'class'"></addClass>
		<teaching v-else-if="type == 'teaching'" :showTeacher="false"></teaching>
		<research v-else-if="type == 'research'"></research>
		<emulate v-else-if="type == 'emulate'"></emulate>
	</view>
</template>

<script>
	import addClass from './class'
	import teaching from './teaching'
	import research from './research'
	import emulate from './emulate'
	export default {
		data() {
			return {
				title: "",
				type: "",
			}
		},
		components: {
			addClass,
			teaching,
			research,
			emulate
		},
		onLoad(option) {
			this.title = "添加" + option.title
			this.type = option.type
		},
		methods: {
			//标签页切换
			tabClick(text) {
				this.activeTab = text
			},
			//活动详情
			handleClick() {
				this.$tab.navigateTo(`/pages/activity/index`)
			},
			reportClick() {
				this.$tab.navigateTo(`/pages/activity/report`)
			}
		}
	}
</script>

<style lang="scss">
	.content {}
</style>